<?php

declare(strict_types=1);

namespace App\Exception;

use App\Constants\ErrorCode;
use Throwable;

/**
 * 验证失败异常
 */
class ValidationException extends BusinessException
{
    public function __construct(string $message = null, Throwable $previous = null)
    {
        parent::__construct(ErrorCode::VALIDATION_ERROR, $message ?? ErrorCode::getMessage(ErrorCode::VALIDATION_ERROR), $previous);
    }
}

